#include <iostream>
#include "log.hpp"
#include <gflags/gflags.h>

DEFINE_bool(run_mode, false, "程序运行模式 false-调试 true-发布");
DEFINE_string(log_file, "log.txt", "发布模式下 输出文件的，文件名");
DEFINE_int32(log_level, 0 , "日志等级");

int main(int argc, char* argv[])
{
    std::cout << "aaaaaaaaaaa" << std::endl;
    google::ParseCommandLineFlags(&argc,&argv, true);
    std::cout << "aaaaaaaaaaa" << std::endl;

    init_logger(FLAGS_run_mode, FLAGS_log_file, FLAGS_log_level);
    std::cout << "aaaaaaaaaaa" << std::endl;

    DEBUG_LOG("你好 {}", "linux");
    DEBUG_LOG("你好 {}", "linux");
    DEBUG_LOG("你好 {}", "linux");
    DEBUG_LOG("你好 {}", "linux");
    DEBUG_LOG("你好 {}", "linux");
    std::cout << "aaaaaaaaaaa" << std::endl;

    return 0;
}